import Rx from "../../../qbasics/abstract/Rx.js"
import Phere from "../../../qbasics/basics/Phere.js"
import StrTo from "../../../qbasics/utils/StrTo.js"

import RunEntity from "./RunEntity.js"


export default function   RunJsr(name,obj,value,type){

    let comms=[]
   let root= qguan("root")
    let data=root.findData(name)

    data.then((data1)=>{
            let rx =new Rx();
             rx.loadData(data1);
            let buff=  rx.findFile(obj);
            let phere=new Phere();

             phere.loadData(buff)

            let block= round.findBlock(2)

            for (let i=0;i<block.length;i++){
                let comm=[];
                let row=block.findRow(i+1);
                for(let l=0;l<4;l++){
                    comm.push(StrTo.numToUtf8(row.find(l+1)))
                }
                 comms.push(comm)
            }
            let runEnt=  new    RunEntity(comms)
            let run= qguan('run')
            let runContext= run();
            runContext.add(runEnt);
    })

}